<template>
	<view class="recharge-card">
		<view class="recharge-card-title1">请选择充值金额</view>
		<view class="pice">
			<view @click="piceTabteZindex = index"
				:class="{'pice-item-active':piceTabteZindex == index,'pice-item':true}"
				v-for="(item,index) in piceTabte" :key="index">
				<view class="pice-content">
					<text class="text">￥</text>
					<text class="text">{{item.numb}}</text>
				</view>
				<view class="pice-icon">
					<u-icon name="checkbox-mark" color="#FFFFFF" size="24rpx"></u-icon>
				</view>
			</view>
			<view class="pice-item pice-item-empty" style="height: 0;"></view>
			<view class="pice-item pice-item-empty" style="height: 0;"></view>
		</view>

		<u--input placeholder="自定义金额" border="surround" inputAlign="center" v-model="value"></u--input>
		<view class="recharge-card-title2">充值规则：</view>
		<view class="">
			<view class="">1.</view>
			<view class="">2.</view>
			<view class="">3.</view>
			<view class="">4.</view>
		</view>
		
		<view class="btn">
			<view class="tips">
				<text style="font-size: 24rpx;">充值金额￥</text>
				<text style="font-size: 40rpx;">11000</text>
			</view>
			<view class="submit">立即充值</view>
		</view>
	</view>
</template>
<script>
	export default {
		name: 'RechargeCard',
		data() {
			return {
				value: '',
				piceTabteZindex: 0,
				piceTabte: [{
						numb: 100
					},
					{
						numb: 200
					},
					{
						numb: 300
					},
					{
						numb: 500
					},
					{
						numb: 1000
					}
				]
			}
		},
		methods: {},
	}
</script>
<style lang="scss" scoped>
	.recharge-card {
		padding: 0 80rpx 120rpx 80rpx; 
		.btn{
			position: fixed;
			bottom: 0;
			left: 0;
			right: 0;
			display: flex;
			align-items: center;
			background-color: #FFFFF;
			justify-content: space-between;
			padding: 0 60rpx;
			height: 100rpx;
			.tips{
				display: flex;
				align-items: flex-end;
			}
			.submit{
				background-color: #f74062;
				border-radius: 40rpx;
				width: 240rpx;
				height: 80rpx;
				line-height: 80rpx;
				text-align: center;
				color: #FFFFFF;
			}
		}
		.recharge-card-title1 {
			color: #666666;
			margin-top: 50rpx;
			margin-bottom: 20rpx;
		}

		.recharge-card-title2 {
			margin: 80rpx 0 30rpx 0;
			font-size: $uni-font-size-lg;
		}

		.pice {
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;

			.pice-item {
				position: relative;
				width: 180rpx;
				height: 100rpx;
				border: 2rpx solid #f2f2f2;
				margin-bottom: 20rpx;
				border-radius: 10rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				overflow: hidden;
				

				.pice-content {
					.text:nth-child(1) {
						font-size: $uni-font-size-sm;
					}

					.text:nth-child(2) {
						font-size: 34rpx;
					}
				}

				.pice-icon {
					position: absolute;
					bottom: 0;
					right: 0;
					width: 30rpx;
					height: 30rpx;
					display: flex;
					align-items: flex-end;
					justify-content: flex-end;
					opacity: 0;
					
					&::after {
						position: absolute;
						top: -4rpx;
						left: -4rpx;
						z-index: -1;
						content: '';
						transform: rotate(45deg);
						width: 80rpx;
						height: 80rpx;
						background-color: #f74062;
					}
				}
			}

			.pice-item-active {
				border-color: #f74062;

				.pice-icon {
					opacity: 1;
				}
			}

			.pice-item-empty {
				border: none;
			}
		}
	}
</style>
